<?php
/**
 * Created by PhpStorm.
 * User: wuxiaojie
 * Date: 2018/6/9
 * Time: 15:48
 *
 * 移动端首页
 */

if (!defined('IN_ANWSION')) {
    die;
}

class main extends AWS_CONTROLLER
{

    public function get_access_rule()
    {
        $rule_action['rule_type'] = "white"; //'black'黑名单,黑名单中的检查  'white'白名单,白名单以外的检查

        if ($this->user_info['permission']['visit_explore'] AND $this->user_info['permission']['visit_site']) {
            $rule_action['actions'][] = 'index';
        }

        return $rule_action;
    }

    public function setup()
    {
        if (is_mobile() AND !$_GET['ignore_ua_check']) {
            switch ($_GET['app']) {
                default:
                    HTTP::redirect('/m/');
                    break;
            }
        }
    }


    public function index_action()
    {
        TPL::assign('seo', array('title'=>'商品详情'));

        TPL::output('aomas/m_home/index');

    }


}